package org.javaopenaccess.web.ui.menu;

import org.zkoss.zk.ui.Executions;
import org.zkoss.zul.Window;

public class MainMenuController extends Window{
	private static final long serialVersionUID = 3916953228493133524L;
	
	public void redirect(String page){
		String redirectPage;
		if (page.equals("model")){
			redirectPage = "model.html";
		}else if (page.equals("queries")){
			redirectPage = "queries.html";
		}else if (page.equals("help")){
			redirectPage = "frontpage.html";
		}else if (page.equals("settings")){
			redirectPage = "settings.html";
		}else{
			redirectPage = "errorPage.html";
		}
		Executions.sendRedirect(redirectPage);
		
	}

}
